<?php

namespace App\Model;

use Hyperf\Database\Model\Relations\BelongsTo;
use Util\Common;

/**
 * 百名单-模型
 */
class White extends Model
{

//    use TimeZoneTrait;

    public bool $timestamps = true;

    const NORMAL = 0;
    const SUCCESS = 1;
    const ERROR = 2;
    protected ?string $table = 'white';

    protected array $fillable = [
        'id','distributor_id', 'device_id', 'user_id','is_check','station_id'
    ];

    protected array $casts = [
        'created_at' => 'datetime:Y-m-d H:i:s',
        'updated_at' => 'datetime:Y-m-d H:i:s',
    ];


    public function user() :BelongsTo{
        return $this->belongsTo(User::class,'user_id','id');
    }

    public function station() :BelongsTo{
        return $this->belongsTo(Station::class,'station_id','id');
    }


}
